package com.example.mq.mqclient;

import lombok.Data;

import java.io.IOException;

/**
 * 使用该类来获取一个TCP连接
 */

@Data
public class ConnectionFactory {
    private String host;
    private int port;
    //访问BrokerServer中的哪个虚拟主机
    //这几个属性先不考虑
    //private String virtualHostName;
    //private String password;
    //private String userName;
    public Connection getNewConnection() throws IOException {
        Connection connection = new Connection(host,port);
        return connection;
    }
}
